﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Biz_Dal.Dal;

namespace Biz_Dal.Biz
{
    public class BizVourcher
    {

        #region "Khởi tạo"
        public BizVourcher()
        { 
        
        }
        public BizVourcher(int id, string ma, double giatri)
        {
            this._idVourcher = id;
            this._maVourcher = ma;
            this._giaTri = giatri;
        }
        #endregion

        #region "Thuộc tính"
        private int _idVourcher;
        public int idVourcher
        {
            get
            {
                return this._idVourcher;
            }
            set
            {
                if ((this._idVourcher != value))
                {
                    this._idVourcher = value;
                }
            }
        }

        private string _maVourcher;
        public string maVourcher
        {
            get
            {
                return this._maVourcher;
            }
            set
            {
                if ((this._maVourcher != value))
                {
                    this._maVourcher = value;
                }
            }
        }

        private double _giaTri;
        public double giaTri
        {
            get
            {
                return this._giaTri;
            }
            set
            {
                if ((this._giaTri != value))
                {
                    this._giaTri = value;
                }
            }
        }
        #endregion

        public static void insertVourcher(BizVourcher vtDTO)
        {
            try
            {
                DalVourcher.insertVourcher(vtDTO);
            }
            catch
            {
                throw new Exception("Error!");
            }
        }
    }
}
